﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using MethodParameter_ExtensionMethod.ExtensionMethod;

namespace MethodParameter_ExtensionMethod
{
  class Program
  {
    static void Main(string[] args)
    {
      string str = "Hello, This is Optional parameter demo";
      var result = WordProcessor.GetWords(str);
      foreach (var s in result)
        Console.WriteLine(s);
      ////////////
      result = WordProcessor.GetWords(str, true);
      Console.WriteLine("This is result of WordProcessor.GetWords(str,true)");
      foreach (var s in result)
        Console.WriteLine(s);
      ////////////
      result = WordProcessor.GetWords(str, false,true);
      Console.WriteLine("This is result of WordProcessor.GetWords(str,true,true)");
      foreach (var s in result)
        Console.WriteLine(s);
      ////////////
      result = WordProcessor.GetWords(str, reverseOrder:true,toUpperCase: false);
      Console.WriteLine("This is result of WordProcessor.GetWords(str,true,true)");
      foreach (var s in result)
        Console.WriteLine(s);

      result = str.GetWords();
      Console.WriteLine("This is result of str.GetWords()");
      foreach (var s in result)
        Console.WriteLine(s);

      Console.ReadKey();
    }
  }
}
